]> dgit.raspbian.org Git - gnome-shell.git/commit
cleanup: Use consistent style for ternary operator
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Aug 2019 19:33:15 +0000 (21:33 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 15 Sep 2019 13:30:19 +0000 (13:30 +0000)
commitaf87bd8c877bf8c88ba37ecfc73db7c220d0f47e
treebe7dde8caf1a118bbcca4c9cc5b4aa872434341c
parent4bfb4a0e3d55e57c59a9ff1e7defe426d9d7df93
cleanup: Use consistent style for ternary operator

We are currently inconsistent whether to put the operators in front
of the corresponding line or at the end of the preceding one. The
most dominant style for now is to put condition and first branch on
the same line, and then align the second branch:

  let foo = condition ? fooValue
                      : notFooValue;

Unfortunately that's a style that eslint doesn't support, so to account
for it, our legacy configuration currently plainly ignores all indentation
in conditionals.

In order to drop that exception and not let messed up indentation slip
through, change all ternary operators to the non-legacy style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725
25 files changed:
js/misc/systemActions.js
js/ui/altTab.js
js/ui/appDisplay.js
js/ui/calendar.js
js/ui/components/keyring.js
js/ui/components/telepathyClient.js
js/ui/dash.js
js/ui/dateMenu.js
js/ui/iconGrid.js
js/ui/inhibitShortcutsDialog.js
js/ui/layout.js
js/ui/messageTray.js
js/ui/mpris.js
js/ui/notificationDaemon.js
js/ui/overviewControls.js
js/ui/pageIndicators.js
js/ui/popupMenu.js
js/ui/screenShield.js
js/ui/search.js
js/ui/sessionMode.js
js/ui/status/keyboard.js
js/ui/status/location.js
js/ui/status/nightLight.js
js/ui/status/volume.js
js/ui/viewSelector.js